package com.itheima.mapper;

import com.github.pagehelper.Page;
import com.itheima.pojo.Student;
import com.itheima.pojo.StudentQueryParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper {
    Page<Student> selectStudents(StudentQueryParam sqp);

    void insertStudent(Student student);

    /**
     * 根据id查询学生信息
     * @param id
     * @return
     */
    @Select("select * from student where id = #{id}")
    Student selectStudentById(Integer id);

    void updateStudent(Student student);


    void deleteStudentsByIds(List<Integer> ids);

    void updateViolation(Integer id, Integer score);
}
